package com.cloud.shopping.goods.feign;

import com.cloud.shopping.goods.model.Category;
import com.cloud.shopping.tool.RespResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author John.zhang
 * @version Id: CategoryFeign, v 1.0 2021/1/3 12:52 ZhiYong Exp $
 */
@FeignClient(value = "shopping-goods")
public interface CategoryFeign {

    /**
     * 根据分类查询分类信息
     * @param id id
     * @return RespResult
     */
    @GetMapping(value = "/category/{id}")
    RespResult<Category> one(@PathVariable(value = "id")Integer id);

}
